package com.lzw.okgoutils.http.otherutils;

import android.os.Environment;

/**
 * 常量
 */
public class BaseConstant {
    //项目保存的根路径
    public static final String ROOT_STORAGE_PATH = Environment.getExternalStorageDirectory().getPath() + "/your_app_name/";

    public static final int TAG_URL_LOGIN_IN = 0;
    public static final int TAG_URL_LOGIN_OUT = 1;

    public static final String ACTION_LOGIN_IN = "login_in";
    public static final String ACTION_LOGIN_OUT = "login_out";

    public static String getBaseUrl(){
        String baseUrl = "http:xxx.xx.xx/";
        return baseUrl;
    }

    public static String getLoginUrl(){
        String baseUrl = getBaseUrl() + "XXX";
        return baseUrl;
    }

    public static String getLoginOutUrl(){
        String baseUrl = getBaseUrl() + "XXX";
        return baseUrl;
    }

    public static String getWeatherUrl(){
        String baseUrl = getBaseUrl() + "XXX";
        return baseUrl;
    }

    public static String getActionName(String name){
        String result = null;
        switch(name){
            case ACTION_LOGIN_IN:
                result = ACTION_LOGIN_IN;
                break;
            case ACTION_LOGIN_OUT:
                result = ACTION_LOGIN_OUT;
                break;
            default:
                break;
        }
        return result;
    }

}
